<!-- 
	动态组件：文本 组件
	props: 
		data: 组件数据
		
	action:
		
 -->
<template>
    <view class="dynamic-text">
        <text
            :style="{
                fontSize: data.TextSize * 2 + 'rpx',
                textAlign: data.TextAlign,
                color: data.TextColor ? data.TextColor : '',
                backgroundColor: data.TextBgColor ? data.TextBgColor : '',
            }"
            >{{ data.TextContent }}</text
        >
    </view>
</template>

<script>
export default {
    props: {
        data: {
            type: Object,
            default: () => {},
        },
    },
    data() {
        return {}
    },
    mounted() {
        this.$emit("loadBack", this.data.index)
    },
    methods: {},
}
</script>

<style lang="scss" scope>
@import "@/uni-sub-base/components/dynamic/style/dynamic.scss";
.dynamic-text {
    text {
        padding: $dy-padding-default;
        display: block;
    }
}
</style>
